, DisplayInfo:true}});The effect of this gridpanel is as follows:In this gridpanel, we can check the data row by checking the box, you can edit the "age" and "Phone" column, and the data can be sorted by the client.Columns of the ExtJS GridpanelThere are several types of columns for ExtJS Gridpanel, such as: text columns, numeric columns, date columns, selection box columns, action columns, and so on. We can specify different column types through xtype.The following are the common configuration
from the server. SeeData guide for more on usingProxies.Grid panel
Currently, we have a model that defines our data structure and adds these model instances to the store. Then we can use the grid panel to display data:
Now that we haveModel which defines our data structure, and we 've loaded severalModel instances intoStore, we're ready to display the data usingGrid panel:
Ext.create('Ext.grid.Panel', { renderTo: Ext.getBody(), store: userStore, width: 400, height: 200, title: '
, that is, all the data in the table can be obtained through the store.Listeners: {itemdblclick:function (view, record, item, index, E, eopts) {}}Analytical:View:Ext.view.View Record:Ext.data.ModelThe record that belongs to the itemItem:htmlelementThe item ' s elementIndex:numberThe item ' s indexE:ext.eventobjectThe Raw event objectEopts:objectThe options Object passed to Ext.util.Observable.addListener. extjs gridpanel column ExtJS gridpanel columns have several types, such as: text columns
Use Ext. grid. column. the Column definition Column is created as shown in the previous example. grid. you must specify the columns option when using Panel. This option is either Ext. grid. column. column array, which is either a JavaScript Object and must contain an items attribute... use Ext. grid. column. the Column definition Column is created as shown in the previous example. grid. you must specify the columns option when using Panel. This option is either Ext. grid. column. the Column arra
‘, data: [ { name: ‘Lisa‘, email: ‘[emailprotected]‘, phone: ‘555-111-1224‘ }, { name: ‘Bart‘, email: ‘[emailprotected]‘, phone: ‘555-222-1234‘ }, { name: ‘Homer‘, email: ‘[emailprotected]‘, phone: ‘555-222-1244‘ }, { name: ‘Marge‘, email: ‘[emailprotected]‘, phone: ‘555-222-1254‘ } ]});For simplicity, inline data is used here, and in real-world applications, the server-side data is usually loaded using proxies, and the agent can view the ExtJS 4 data (package)
Use Ext. Grid. Column. Column to define a column
As shown in the preceding example, create Ext. grid. you must specify the columns option when using panel. This option is either Ext. grid. column. the column array is either a JavaScript Object, which must contain an items attribute, and the attribute value is still Ext. grid. column. column array -- in short, define Ext. grid. panel, ext. grid. column. column array to define data columns.
You can use Ext. Grid. Column. Column to define column de
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.